package com.ushine.design.design.a_creative_mode.a_simple_factory.b_example;

/**
 * @author yls
 */
public class Client {
    public static void main(String[] args) {
        Chart chart;
        chart = ChartFactory.getChart(ChartConstant.PIE_CHART);
        chart.display();


        /**
         * 抽象工厂和产品类合并
         */

        System.out.println();
        System.out.println("抽象产品和工厂类合并：");
        String value = "histogram";
        Chart newChart = Chart.getChart(value);
        newChart.display();

    }
}	
